#!/bin/sh
#BHEADER**********************************************************************
# Copyright (c) 2008,  Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
# This file is part of HYPRE.  See file COPYRIGHT for details.
#
# HYPRE is free software; you can redistribute it and/or modify it under the
# terms of the GNU Lesser General Public License (as published by the Free
# Software Foundation) version 2.1 dated February 1999.
#
# $Revision: 1.15 $
#EHEADER**********************************************************************







#=============================================================================
# ij: Run default case with different solvers
#    1: BoomerAMG_PCG
#    2: DS_PCG
#    3: BoomerAMG_GMRES
#    4: DS_GMRES
#    5: BoomerAMG_CGNR
#    6: DS_CGNR
#    7: PILUT_GMRES
#    8: ParaSails_PCG
#   20: Hybrid_PCG
#



# lobpcg: Run default case with all available PCG preconditioners
#    1: BoomerAMG_PCG
#    2: DS_PCG
#    8: ParaSails_PCG
#   12: Schwarz_PCG
#   43: Euclid_PCG
#
# new_ij: test systems AMG
#	  unknown approach
#	  hybrid approach with block smoother
# 	  nodal approach
#       more solvers:
#        51: BoomerAMG_LGMRES
#        50: DS_LGMRES
#        61: BoomerAMG_FlexGMRES
#        60: DS_FlexGMRES
#
#=============================================================================

mpirun -np 2 ./ij -solver 1 -rhsrand > solvers.out.0
mpirun -np 2 ./ij -solver 2 -rhsrand > solvers.out.1
mpirun -np 2 ./ij -solver 3 -rhsrand > solvers.out.2
mpirun -np 2 ./ij -solver 4 -rhsrand > solvers.out.3
mpirun -np 2 ./ij -solver 5 -rhsrand -w 0.67 -ns 2 > solvers.out.4
mpirun -np 2 ./ij -solver 6 -rhsrand > solvers.out.5
mpirun -np 2 ./ij -solver 7 -rhsrand > solvers.out.6
mpirun -np 2 ./ij -solver 8 -rhsrand > solvers.out.7
mpirun -np 2 ./ij -solver 20 -rhsrand > solvers.out.8
mpirun -np 2 ./ij -solver 20 -cf 0.5 -rhsrand > solvers.out.9
mpirun -np 2 ./ij -solver 20 -cf 0.5 -rhsrand -solver_type 2 > solvers.out.10
mpirun -np 2 ./ij -solver 20 -cf 0.5 -rhsrand -solver_type 3 > solvers.out.11


#PCG run ...LOBPCG run for one eigenpair...LOBPCG for 5 eigenpairs
mpirun -np 2 ./ij -solver 1 -tol 1.e-6  > solvers.out.1.lobpcg
mpirun -np 2 ./ij -lobpcg -solver 1 -tol 1.e-6 -pcgitr 0 -seed 1 -vrand 1 > solvers.out.1.lobpcg.1
mpirun -np 2 ./ij -lobpcg -solver 1 -tol 1.e-6 -pcgitr 0  -seed 1 -vrand 5 > solvers.out.1.lobpcg.5

#PCG run ...LOBPCG run for one eigenpair...LOBPCG for 5 eigenpairs
mpirun -np 2 ./ij -solver 2 -tol 1.e-6  > solvers.out.2.lobpcg
mpirun -np 2 ./ij -lobpcg -solver 2 -tol 1.e-6  -pcgitr 20 -seed 1 -vrand 1 > solvers.out.2.lobpcg.1
mpirun -np 2 ./ij -lobpcg -solver 2 -tol 1.e-6  -pcgitr 20 -seed 1 -vrand 5 > solvers.out.2.lobpcg.5

#PCG run ...LOBPCG run for one eigenpair...LOBPCG for 5 eigenpairs
mpirun -np 2 ./ij -solver 8 -tol 1.e-6  > solvers.out.8.lobpcg
mpirun -np 2 ./ij -lobpcg -solver 8 -tol 1.e-6  -pcgitr 10 -seed 1 -vrand 1 > solvers.out.8.lobpcg.1
mpirun -np 2 ./ij -lobpcg -solver 8 -tol 1.e-6  -pcgitr 10 -seed 1 -vrand 5 > solvers.out.8.lobpcg.5

#PCG run ...LOBPCG run for one eigenpair...LOBPCG for 5 eigenpairs
mpirun -np 2 ./ij -solver 12 -tol 1.e-6  > solvers.out.12.lobpcg
mpirun -np 2 ./ij -lobpcg -solver 12 -tol 1.e-6  -pcgitr 10 -seed 1 -vrand 1 > solvers.out.12.lobpcg.1
mpirun -np 2 ./ij -lobpcg -solver 12 -tol 1.e-6  -pcgitr 10 -seed 1 -vrand 5 > solvers.out.12.lobpcg.5

#PCG run ...LOBPCG run for one eigenpair...LOBPCG for 5 eigenpairs
mpirun -np 2 ./ij -solver 43 -tol 1.e-6  > solvers.out.43.lobpcg
mpirun -np 2 ./ij -lobpcg -solver 43 -tol 1.e-6  -pcgitr 10 -seed 1 -vrand 1 > solvers.out.43.lobpcg.1
mpirun -np 2 ./ij -lobpcg -solver 43 -tol 1.e-6  -pcgitr 10 -seed 1 -vrand 5 > solvers.out.43.lobpcg.5

#systems AMG run ...unknown approach, hybrid approach, nodal approach
mpirun -np 2 ./new_ij -n 20 20 20 -sysL 2 -nf 2 > solvers.out.sysu
mpirun -np 2 ./new_ij -n 20 20 20 -sysL 2 -nf 2 -nodal 1 -smtype 6 -smlv 10 -dom 1 -ov 0 > solvers.out.sysh
mpirun -np 2 ./new_ij -n 20 20 20 -sysL 2 -nf 2 -interptype 10 > solvers.out.sysn

#LGMRS and FlexGMRES
mpirun -np 2 ./new_ij -solver 50 -rhsrand > solvers.out.101
mpirun -np 2 ./new_ij -solver 51 -rhsrand > solvers.out.102
mpirun -np 2 ./new_ij -solver 60 -rhsrand > solvers.out.103
mpirun -np 2 ./new_ij -solver 61 -rhsrand > solvers.out.104

#redundant coarse grid solve
mpirun -np 8 ./new_ij -n 80 80 80 -P 2 2 2 -agg_nl 1 -hmis -interptype 6 -Pmx 4 -seq_th 100 -solver 1 -rlx 6 > solvers.out.105
